package com.kb.erp.service.impl;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.kb.erp.entity.DesignOrder;
import com.kb.erp.mapper.pg.DesignOrderMapper;
import com.kb.erp.service.DesignOrderService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * 订单表(DesignOrder)表服务实现类
 *
 * @author makejava
 * @since 2023-11-24 10:56:50
 */
@Service("designOrderService")
@DS("pg")
public class DesignOrderServiceImpl extends ServiceImpl<DesignOrderMapper,DesignOrder> implements DesignOrderService {
    @Resource
    private DesignOrderMapper designOrderMapper;

    @Override
    public List<DesignOrder> queryList(DesignOrder designOrder) {
        return designOrderMapper.selectList(Wrappers.lambdaQuery(DesignOrder.class).eq(DesignOrder::getOrderNo, designOrder.getOrderNo()));
    }

    @Override
    public List<DesignOrder> queryListByOrderNo(String orderNo) {
        return designOrderMapper.selectList(Wrappers.lambdaQuery(DesignOrder.class).eq(DesignOrder::getOrderNo, orderNo));
    }
}
